function[class] = thresholdClassification(features)
% Classifies the given image using thresholds on extracted features.
%
%   INPUT
%   features....feature vector
%   OUTPUT
%   class.......the classification for the given image features as a string
    
    %pencils have a low aspect-ratio factor
    if (features(1) < 0.2)
        class = 'pencil';
    else
        %apples have very high compactness (aspect ratio is high too, but
        %not as good)
        if (features(3)>0.9)
            class= 'apple';
        else
            %both bat and tree have low formfactors (<0.4), so it can only be a
            %cellphone
            if (features(2)>0.4)
                class= 'cellular_phone';
            else
                %this one is hard
                if (features(1)>0.58 || features(1)<0.32 || features(2)>0.29 || features(3) > 0.59 )
                    class= 'tree';
                else
                    class= 'bat';
                end
            end
        end
    end
end
